﻿@model IEnumerable<OplDataEntry.Models.Fixture>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
           First
        </th>
        <th>
            Second
        </th>
        <th>
           Won
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Date)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Season.SeasonName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Crew.Name)
        </th>
        <th>
          1st Batting
        </th>
        <th>
           2nd Batting
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ResultDescription)
        </th>
        <th>
            1st team score
        </th>
        <th>
            2nd team score
        </th>
        <th>
            1st team Wickets
        </th>
        <th>
            1st team Wickets
        </th>
        <th></th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Team.TeamName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team1.TeamName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team2.TeamName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Season.SeasonName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Crew.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team3.TeamName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team4.TeamName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ResultDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team1Score)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team2Score)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team1Wickets)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Team2Wickets)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
            @Html.ActionLink("Details", "Details", new { id = item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.Id })
        </td>
    </tr>
}

</table>
